<!-- 图例 -->
<template>
    <div class="legendTool" style="width: 50px; background: #fff; z-index: 99; position: fixed; right: 20px; bottom: 30px; border-radius: 5px; padding: 2px 0; border: 1px solid #f3f3f3;">
        <div style="font-size: 14px; text-align: center; height: 28px; line-height: 28px; border-bottom: 1px solid #f3f3f3; margin: 0 5px;font-weight: bolder;">
            图例
        </div>
        <div v-for="(item,index) in legendDatas" :key="index" style="height:56px;padding: 5px 0px;">
            <div style=" height: 24px; width: 24px;margin: 0 14px;" :style="{background:item.color}">
                <div style="width:20px;height:20px;color:red;"></div>
            </div>
            <div style="text-align: center;margin: 5px 0">{{item.title}}</div>
        </div>
    </div>
</template>

<script>
export default {
    name: "legendTool",
    props:{
        legendDatas:Array,
    },
    data() {
        return {            
            // legendDatas: []
        };
    },

    methods: {},

    mounted() {
    },

}
</script>

<style lang="scss" scoped>
/*.legendTool{
    width: 50px;
    background: #fff;
    z-index: 99;
    position: fixed;
    right: 20px;
    bottom: 30px;
    border-radius: 5px;
    padding: 2px 0;
    border: 1px solid #f3f3f3;
}*/
</style>
